// 渲染商品列表
(function () {
    fetch('http://chst.vip:1234/api/getinlanddiscount')
        .then(response => {
            return response.json()
        }).then(data => {
            let res = data.result
            console.log(res);
            let ele = ''
            res.forEach(item => {
                ele += `
                <li>
                    <a href="inlandproduct.html?productid=${item.productId}">
                        <div class="img">${item.productImg}</div>
                        <div class="title">${item.productName}</div>
                        <div class="price">${item.productPrice}</div>
                        <div class="from">${item.productFrom} | ${item.productTime}</div>
                    </a>
                </li>
                `
            });
            $('.info').html(ele);
        }); 
})();
